[SP-] 배포 시 일부 페이지가 amplitude 오류로 렌더되지 않는 오류 수정 #361
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
기존 amplitude를 초기화하는 시점이 컴포넌트 바깥인데,
이 경우 pages/project/[id] 에 있는 파일들이 구워질 때 에러가 발생합니다
정확한 원인은 모르지만, 일단 생명주기 안쪽으로 init하는 코드를 옮겨 문제를 해결하였습니다.
배포 전에 편할 때 develop으로 머지해 주세요!!